﻿#include "setjinyangqi.h"
#include <QPainter>
#include <QColor>
SetJinyangqi::SetJinyangqi(QWidget *parent)
    : QWidget{parent}
{

}
void SetJinyangqi::paintEvent(QPaintEvent *event)
{
    QPainter painter(this);
    painter.setRenderHint(QPainter::Antialiasing, true);

    painter.save();
    painter.setPen(Qt::NoPen);
    QColor transparentColor(255, 255, 255);
    painter.setBrush(transparentColor);
    painter.drawRect(rect().x(), rect().y(), rect().width(), 30);
    painter.drawRoundedRect(rect(), 15, 15);
    painter.restore();

    painter.save();
    painter.setPen(Qt::NoPen);
    painter.setBrush(QColor(224, 224, 224, 128));
    painter.drawRect(rect().x()+20, rect().y(), rect().width()-40, 3);
    painter.restore();
}
